package com.wind.taobao.api.trade.trade.rest
{
	import com.wind.taobao.api.IPrivateAPI;
	import com.wind.taobao.core.exception.InvalidRequestParametersException;
	import com.wind.taobao.core.util.TaobaoUtils;
	import com.wind.taobao.core.webservice.TaobaoRequest;

	/**
	 * taobao.refund.messages.get Request
	 * @author fxy
	 *
	 */
	public class RefundMessagesGetRequest extends TaobaoRequest implements IPrivateAPI
	{
		public override function get method():String
		{
			return "taobao.refund.messages.get"
		}
		/**
		 * Y 	 需返回的字段列表。可选值：RefundMessage结构体中的所有字段；以半角逗号(,)分隔。
		 */
		[Bindable]
		public var fields:String="message_id,refund_id,owner_id,owner_nick,owner_role,content,picture_urls,created";
		/**
		 * Y 	退款单号
		 */
		[Bindable]
		public var refund_id:String;
		/**
		 * N 	页码。取值范围:大于零的整数; 默认值:1
		 */
		[Bindable]
		public var page_no:int;
		/**
		 * N 	每页条数。取值范围:大于零的整数; 默认值:40;最大值:200
		 */
		[Bindable]
		public var page_size:int;

		public override function validate():void
		{
			if (!TaobaoUtils.hasAllValue([fields, refund_id]))
			{
				throw new InvalidRequestParametersException("请求参数[fields, refund_id]不能为空");
			}
		}
	}
}